{% extends "base.html" %}
{% load static %}



{% block title %}Log in{% endblock %}

{% block extrahead %}
<link href="{% static 'css/main.css' %}" rel="stylesheet" type="text/css"/>
{% endblock %}

{% block navbar_items %}{% endblock %}

{% block page_title %}Log in{% endblock %}

{% block page_body %}

{% if form.errors %}
<p>Your username and password did not match. Please try again.</p>
{% endif %}

<form method="post" action="{% url 'login' %}">
{% csrf_token %}

<table>
{% for field in form %}
    <tr>
        <td colspan="2">{{ field.errors }}</td>
    </tr>
    <tr>
        <td class="fieldKey">{{ field.label_tag }}</td>
        <td class="fieldValue">{{ field }}</td>
    </tr>
{% endfor %}
</table>

<p><input type="submit" value="Login" id="submit"/></p>
<input type="hidden" name="next" value="{{ next }}"/>

<p>Don't have an account yet? <a href="{% url 'signup' %}">Create one now!</a></p>
<p><a href="{% url 'password_reset' %}">Forgot your password?</a></p>

</form>
{% endblock %}
